Skip to content

Instantly share code, notes, and snippets.

@AndreaPasqualini
AndreaPasqualini / install-matlab-wsl.md
Last active December 4, 2025 10:20
Instructions to install MATLAB on WSL

Installing MATLAB on WSL

This guide serves as a note to self to remember how to install MATLAB on a WSL virtual machine.

Environment

Ubuntu 20.04 on WSL2, with Windows 10.

@7r1ck8o7
7r1ck8o7 / Public_DNS.md
Last active December 4, 2025 10:20
Public DNS Server

Google Public DNS [AS15169]:


Google Public DNS

Preferred IPv4 DNS server 8.8.8.8
Alternate IPv4 DNS server 8.8.4.4
Preferred IPv6 DNS server 2001:4860:4860:8888
Alternate IPv6 DNS server 2001:4860:4860:0:0:0:0:8888
Preferred IPv6 DNS server 2001:4860:4860:8844
Alternate IPv6 DNS server 2001:4860:4860:0:0:0:0:8844
// demonstrate advantages of moving task from view to loading state
struct FeedView: View {
@Environment(BlueSkyClient.self) private var client
@Environment(AppTheme.self) private var theme
enum ViewState {
case loading
case error(String)
case loaded([Post])
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 4, 2025 10:17
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@AymaneHrouch
AymaneHrouch / autosub_reddit.js
Last active December 4, 2025 10:16
Auto subscribe to a lot of subreddits after you move to a new account.
/*
-Visit https://old.reddit.com/subreddits/ using your old account
-Copy link address of "multireddit of your subscriptions"
It will give you a link address like this: https://old.reddit.com/r/[subreddit1+subreddit2...+subredditN]
Please note that if you have a lot of subreddits the link won't work because there's a limit to the link's length, you can simply split it to two or three links
-Visit that link (or links) using your new account.
-Open the console by pressing F12 and then clicking the console tab
-Past the code bellow and press enter. You're welcome :)
*/
const sub = () => {
@yasin-yilmaz
yasin-yilmaz / Form.tsx
Created December 4, 2025 10:13
A helper class to detect required fields in the Zod schema
import { useForm } from "react-hook-form";
import { TextField } from "@mui/material";
import { zodResolver } from "@hookform/resolvers/zod";
import { schema, TSchema } from "./sampleSchema.ts";
import { makeIsRequired } from "./isRequired";
const isRequired = makeIsRequired(schema);
export function UserForm() {
@denji
denji / nginx-tuning.md
Last active December 4, 2025 10:15
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@bennlee
bennlee / remapping-keys-via-hidutil.md
Created November 19, 2021 05:39
How to remapping keys on macOS without thirdparty applications.

How to remapping keys on macOS without thirdparty applications.

You could remapping keys via the macOS embedded command line tool hidutil.


Key IDs Table
Usage Usage ID (hex) Usage Usage ID (hex) Usage Usage ID (hex) Usage Usage ID (hex)
@PathumRathnayaka
PathumRathnayaka / Intellij idea Activate.txt
Last active December 4, 2025 10:12
etBrains products activation 2025
6G5NXCPJZB-eyJsaWNlbnNlSWQiOiI2RzVOWENQSlpCIiwibGljZW5zZWVOYW1lIjoic2lnbnVwIHNjb290ZXIiLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoiIiwibGljZW5zZVJlc3RyaWN0aW9uIjoiIiwiY2hlY2tDb25jdXJyZW50VXNlIjpmYWxzZSwicHJvZHVjdHMiOlt7ImNvZGUiOiJQU0kiLCJmYWxsYmFja0RhdGUiOiIyMDI1LTA4LTAxIiwicGFpZFVwVG8iOiIyMDI1LTA4LTAxIiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IlBEQiIsImZhbGxiYWNrRGF0ZSI6IjIwMjUtMDgtMDEiLCJwYWlkVXBUbyI6IjIwMjUtMDgtMDEiLCJleHRlbmRlZCI6dHJ1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